package org.unisannio.remote;

import android.app.Activity;
import android.content.Intent;
/**
 * Class needed for RemoteActivity communication.
 * Has to be extended in the actual implementation
 * 
 * 
 * @author Fabio Melillo
 *
 */
public abstract class Proxy extends Activity{
	
	/**
	 * Is called from the middleware, when the requested activity returns
	 * 
	 * @param reqCode - the request code of the original message
	 * @param resCode - the result code returned
	 * @param data - data returned
	 */
	public abstract void onRemoteActivityResult(int reqCode, int resCode, Intent data);
	
	
	/**
	 * Called by the middleware for saving the intent inside the proxy activity.
	 * This intent will be checked onResume() [to be implemented by the developer]
	 * 
	 * @param intent
	 * @param reqCode
	 */
	public abstract void storeRequestIntent(Intent intent, int reqCode);

}
